package com.design.observer.job;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * 抽象主题类定义通知观察者接口
 *
 */
public abstract class AbstractHr {

	protected List<ITalent> allTalents = new ArrayList<>();

	public abstract void publishJob(String job);

	public void addTalent(ITalent talent) {
		allTalents.add(talent);
	}

	public void removeTalent(ITalent talent) {
		if (!allTalents.isEmpty()) {
			allTalents.remove(talent);
		}
	}
}
